import type { IResponse } from '@/api/config/types';
import axios from 'axios';

const prefix = `/v2/sys/api`;

export interface HomeState {
  hz: Hz;
  station: Station;
  tag: Station;
  queue: Queue;
}

interface Queue {
  updating: number;
  updated: number;
  timeout: number;
}

interface Station {
  offline: number;
  online: number;
}

interface Hz {
  [key: string]: string;
}
export const getHomePageState = (type = 1) => {
  return axios.get<IResponse<HomeState>>(`${prefix}/state/${type}`);
};
export const getFonts = () => {
  return axios.get(`${prefix}/fonts`);
};
